package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * SdCustTermOfPayment generated by hbm2java
 */
@Entity
@Table(name="sd_cust_term_of_payment"
    ,catalog="ncsc_erp"
)
public class SdCustTermOfPayment  implements java.io.Serializable {


     private SdCustTermOfPaymentId id;
     private SysTermOfPayment sysTermOfPayment;
     private SdCust sdCust;
     private Date custTermOfPaymentEffectiveDate;
     private Date custTermOfPaymentExpireDate;
     private Short custTermOfPaymentIsActive;

    public SdCustTermOfPayment() {
    }

	
    public SdCustTermOfPayment(SdCustTermOfPaymentId id, SdCust sdCust) {
        this.id = id;
        this.sdCust = sdCust;
    }
    public SdCustTermOfPayment(SdCustTermOfPaymentId id, SysTermOfPayment sysTermOfPayment, SdCust sdCust, Date custTermOfPaymentEffectiveDate, Date custTermOfPaymentExpireDate, Short custTermOfPaymentIsActive) {
       this.id = id;
       this.sysTermOfPayment = sysTermOfPayment;
       this.sdCust = sdCust;
       this.custTermOfPaymentEffectiveDate = custTermOfPaymentEffectiveDate;
       this.custTermOfPaymentExpireDate = custTermOfPaymentExpireDate;
       this.custTermOfPaymentIsActive = custTermOfPaymentIsActive;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="custNo", column=@Column(name="CUST_NO", nullable=false) ), 
        @AttributeOverride(name="custTermOfPaymentSeqNo", column=@Column(name="CUST_TERM_OF_PAYMENT_SEQ_NO", nullable=false) ) } )
    public SdCustTermOfPaymentId getId() {
        return this.id;
    }
    
    public void setId(SdCustTermOfPaymentId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CUST_TERM_OF_PAYMENT_NO")
    public SysTermOfPayment getSysTermOfPayment() {
        return this.sysTermOfPayment;
    }
    
    public void setSysTermOfPayment(SysTermOfPayment sysTermOfPayment) {
        this.sysTermOfPayment = sysTermOfPayment;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CUST_NO", nullable=false, insertable=false, updatable=false)
    public SdCust getSdCust() {
        return this.sdCust;
    }
    
    public void setSdCust(SdCust sdCust) {
        this.sdCust = sdCust;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="CUST_TERM_OF_PAYMENT_EFFECTIVE_DATE", length=10)
    public Date getCustTermOfPaymentEffectiveDate() {
        return this.custTermOfPaymentEffectiveDate;
    }
    
    public void setCustTermOfPaymentEffectiveDate(Date custTermOfPaymentEffectiveDate) {
        this.custTermOfPaymentEffectiveDate = custTermOfPaymentEffectiveDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="CUST_TERM_OF_PAYMENT_EXPIRE_DATE", length=10)
    public Date getCustTermOfPaymentExpireDate() {
        return this.custTermOfPaymentExpireDate;
    }
    
    public void setCustTermOfPaymentExpireDate(Date custTermOfPaymentExpireDate) {
        this.custTermOfPaymentExpireDate = custTermOfPaymentExpireDate;
    }

    
    @Column(name="CUST_TERM_OF_PAYMENT_IS_ACTIVE")
    public Short getCustTermOfPaymentIsActive() {
        return this.custTermOfPaymentIsActive;
    }
    
    public void setCustTermOfPaymentIsActive(Short custTermOfPaymentIsActive) {
        this.custTermOfPaymentIsActive = custTermOfPaymentIsActive;
    }




}


